cmake_minimum_required(VERSION 2.6)

PROJECT(coeff_calc)

add_compile_options(
-g
-Wall
-W
-pipe
)

SET(CMAKE_C_FLAGS -std=gnu99)
SET(CMAKE_CXX_FLAGS -std=c++14)

#  ${CMAKE_SOURCE_DIR}/inc/utils
#  ${CMAKE_SOURCE_DIR}/inc/swfinc
#  ${CMAKE_SOURCE_DIR}/inc/osmiinc
#  ${CMAKE_SOURCE_DIR}/inc/meris
#  ${CMAKE_SOURCE_DIR}/inc/oss
#  ${CMAKE_SOURCE_DIR}/lib3/include
#  ${CMAKE_SOURCE_DIR}/src/lib24to8

INCLUDE_DIRECTORIES (
  ${CMAKE_SOURCE_DIR}/../build/inc/utils
  ${CMAKE_SOURCE_DIR}/../build/inc/swfinc
  ${CMAKE_SOURCE_DIR}/../build/inc/meris
  ${CMAKE_SOURCE_DIR}/../build/inc/msinc
  ${CMAKE_SOURCE_DIR}/../build/inc/cdfinc
  ${CMAKE_SOURCE_DIR}/../build/inc/octsinc
  ${CMAKE_SOURCE_DIR}/../build/inc/osmiinc
  ${CMAKE_SOURCE_DIR}/../build/lib3/include
  ${CMAKE_SOURCE_DIR}/../build/src/lib24to8
)

link_directories(
	#/home/oceanoptics/shared_lib_20180823
  ${CMAKE_SOURCE_DIR}/../build/lib3/lib
)

add_executable(coeff_calc
	ini.c
	main.c
	config.c
	HY1C_out.c
	read_l2.c
	hy1c_util.cpp
	sqlite3_opt.cpp
	sqlite3.c
	aer_io.c
	aerosol.c
	airmass.c
	alloc_aer.c
	alloc_l1.c
	alloc_l2.c
	alloc_target.c
	alloc_vcal.c
	amoeba.c
	aph.c
	atmocor1.c
	atmocor1_land.c
	atmocor2.c
	b128_box_num.c
	b128_msk_get.c
	b128_wd_bit.c
	bin_climatology.c
	brdf.c
	brightness.c
	calcite.c
	carder.c
	cdom_morel.c
	cloud_flag.c
	convert_band.c
	convl12.c
	convl21.c
	covariance_inversion.c
	cpl1rec.c
	filehandle_init.c
	filter.c
	flags_iop.c
	fluorescence.c
	fresnel.c
	fuzzy_func_v3.c
	gammln.c
	gas_trans.c
	gcf.c
	get_chl.c
	get_depth.c
	get_es.c
	get_f0.c
	getformat.c
	get_ice_frac.c
	get_Kd.c
	getl1rec.c
	get_l2prod_index.c
	get_ndvi.c
	get_niwa_iop.c
	get_owmc.c
	get_par.c
	get_pml.c
	get_poc.c
	get_qaa.c
	get_rhos.c
	get_rhown_nir.c
	get_smoke.c
	get_toa_refl.c
	get_tricho.c
	get_tsm.c
	giop.c
	glint.c
	gser.c
	gsm.c
	h5io.c
	ice_mask.c
	init_l1.c
	init_l2.c
	ipar_arp.c
	ipar.c
	l12_seawifs.c
	l1a_osmi.c
	l1a_seawifs.c
	l1_czcs_hdf.c
	l1_hdf_generic_read.c
	l1_hdf_generic_write.c
	l1_hmodis_hdf.c
	l1_io.c
	l1_meris_CC.c
	l1_meris_N1.c
	l1_modis_hdf.c
	l1_mos_hdf.c
	l1_ocm2_hdf.c
	l1_ocmdb_hdf.c
	l1_ocm_hdf.c
	l1_octs_hdf.c
	l1_pci_hdf.c
	l1subpix.c
	l1_viirs_h5.c
	l1_xcal_hdf.c
	l2_generic.c
	las_iop.c
	ll2vec.c
	loadl1.c
	lonlat2pixline.c
	lubksb.c
	ludcmp.c
	msl12_input.c
	mumm.c
	myprod.c
	niwa_iop.c
	nlw_outband.c
	nrutil.c
	owt.c
	photic_depth.c
	pml.c
	pml_iop_calculate.c
	pml_iop_config.c
	pml_iop_tables.c
	polcor.c
	prodgen.c
	prodlist.c
	qaa.c
	rayleigh.c
	rdsensorinfo.c
	scene_meta.c
	seawater.c
	seawater_get.c
	setanc.c
	setflags.c
	smi_climatology.c
	soa_sma.c
	sprsax.c
	sprsin.c
	sssref.c
	sst.c
	sstref.c
	target_io.c
	turbid.c
	vcal.c
	viirs_pxcvt.c
	viirs_utls.c
	virtual_constellation.c
	water.c
	water_vapor.c
	whitecaps.c
	windex.c
	xcal.c
)



target_link_libraries(coeff_calc
hdfutils
netcdf
hdf5_hl
hdf5
l2
anc
czcs
osmi
meris
seawifs
nav
genutils
mfhdf
df
jpeg
z
m
dl
pthread
#gfortran
#quadmath
gsl
gslcblas
fann
xdr
stdc++
)
